package com.qidian.mes.om.controller;

import com.qidian.mes.om.service.DeptService;
import com.qidian.mes.util.pojo.MESResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 戴着假发的程序员
 * @Company 起点编程
 * @Time 2023/11/2 9:32
 * @Description
 */
@RestController
@RequestMapping("/dept")
@CrossOrigin
public class DeptController {

    @Autowired
    private DeptService deptService;

    @GetMapping("/list")
    public MESResult listAll() {
        return deptService.listAll();
    }
}
